package com.c2soft.nepalcmx.controller;



import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.c2soft.nepalcmx.util.JsonUtil;

@Controller
@RequestMapping("notused/order")
public class OrderController {
	@RequestMapping(value = "/buy",method = { RequestMethod.GET,
			RequestMethod.POST }, produces = "application/json")
	@ResponseBody
	public String buy() {
		{
			Map<String, String> buyDtlMap = new HashMap<String, String>();
			buyDtlMap.put("insname", "206803");
			buyDtlMap.put("symbol", "GOLD");
			buyDtlMap.put("qt", "6");
			buyDtlMap.put("ql", "6");
			buyDtlMap.put("qw", "2");
			buyDtlMap.put("price", "48000");
			buyDtlMap.put("tp", "288000");
			return JsonUtil.toJson(buyDtlMap); 
		}
	}
	
	
	@RequestMapping(value = "/sell",method = { RequestMethod.GET,
			RequestMethod.POST }, produces = "application/json")
	@ResponseBody
		public String sell() {
			Map<String, String> sellDtlMap = new HashMap<String, String>();
			sellDtlMap.put("insname1", "206803");
			sellDtlMap.put("symbol1", "GOLD");
			sellDtlMap.put("qt1", "6");
			sellDtlMap.put("ql1", "6");
			sellDtlMap.put("qw1", "2");
			sellDtlMap.put("price1", "48000");
			sellDtlMap.put("tp1", "288000");
			return JsonUtil.toJson(sellDtlMap); 
		}

}

